package com.dropgame.tools;

import com.dropgame.world.DropBody.DropType;

public class ScoreManager {

	public int score;
	public int purpleMultiplier;
	public int greenMultiplier;
	public int orangeMultiplier;
	private int type;
	private DropType typeA;
	private DropType typeB;
	
	public ScoreManager(){
		this.score = 0;
		this.purpleMultiplier = 1;
		this.greenMultiplier = 1;
		this.orangeMultiplier = 1;
	}
	
	public void calculateScore(DropType typeA, DropType typeB){
		this.typeA = typeA;
		this.typeB = typeB;
		if(typeA == typeB){
			
		}
	}
	
	public void calculateScore(int type){
		if(type == 1) {
			plusBlueMultiplier();
			score += (10 * purpleMultiplier);
		} else if (type == 2) {
			plusGreenMultiplier();
			score += (10 * greenMultiplier);
		} else if (type == 3) {
			plusOrangeMultiplier();
			score += (10 * orangeMultiplier);
		} else score += 10;
	}
	
	public void defaultMultiplier(){
		this.purpleMultiplier = 1;
		this.greenMultiplier = 1;
		this.orangeMultiplier = 1;
	}
	
	public void plusBlueMultiplier(){
		this.purpleMultiplier ++;
		this.greenMultiplier = 1;
		this.orangeMultiplier = 1;
	}
	
	public void plusGreenMultiplier(){
		this.greenMultiplier ++;
		this.purpleMultiplier = 1;
		this.orangeMultiplier = 1;
	}
	
	public void plusOrangeMultiplier(){
		this.orangeMultiplier ++;
		this.purpleMultiplier = 1;
		this.greenMultiplier = 1;
	}
}
